<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>${fns:getConfig('productName')} 登录</title>
	<meta name="decorator" content="blank"/>
	<script src="${ctxStatic}/flash/zoom.min.js" type="text/javascript"></script>
	<link href="${ctxStatic}/common/css/layout.css" rel="stylesheet" type="text/css">
	<link href="${ctxStatic}/common/css/login.css" rel="stylesheet" type="text/css"> 
	<style type="text/css">
      html,body,table{background-size:100% 100%;width:100%;height:100%;text-align:center;}
      .form-signin-heading{font-family:Helvetica, Georgia, Arial, sans-serif, 黑体;font-size:36px;margin-bottom:20px;color:#0663a2;}
      .form-signin{
      	  right:0px;
	      position:static;
	      text-align:left;
	      width:380px;
	      height:280px;
	      padding:25px 29px 29px;
	      margin:1.5% 5% 0px auto;
	      background-color:#fff;
	      border:1px solid #e5e5e5;
	      -webkit-border-radius:5px;
	      -moz-border-radius:5px;
	      border-radius:5px;
	      -webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);
	      -moz-box-shadow:0 1px 2px rgba(0,0,0,.05);
	      box-shadow:0 1px 2px rgba(0,0,0,.05);
        }
      .form-signin .checkbox{margin-bottom:10px;color:#0663a2;} 
      .form-signin .input-label{font-size:16px;line-height:23px;color:#999;}
      .form-signin .input-block-level{font-size:16px;height:auto;margin-bottom:15px;padding:7px;*width:283px;*padding-bottom:0;_padding:7px 7px 9px 7px;}
      .form-signin .btn.btn-large{font-size:16px;}
	  .form-signin #themeSwitch{position:absolute;right:15px;bottom:10px;}
      .form-signin div.validateCode {padding-bottom:15px;} 
      .mid{vertical-align:middle;}
      .header{height:80px;padding-top:0px;} 
      .alert{position:relative;width:300px;margin:0 auto;*padding-bottom:0px;}
      label.error{background:none;width:270px;font-weight:normal;color:inherit;margin:0;}
      .login-form { width:590px;margin:0px;float: right;}
    </style>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#loginForm").validate({
				rules: {
					validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
				},
				messages: {
					username: {required: "请填写用户名."},password: {required: "请填写密码."},
					validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
				},
				errorLabelContainer: "#messageBox",
				errorPlacement: function(error, element) {
					error.appendTo($("#loginError").parent());
				} 
			});
		});
		// 如果在框架或在对话框中，则弹出提示并跳转到首页
		if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0){
			alert('未登录或登录超时。请重新登录，谢谢！');
			top.location = "${ctx}";
		}
	</script>
</head>
<body>
	<div style=" min-height:170px; width: 100%;height:170px;margin:0px;padding:2% 0px 0px 1%;">
		<div class="logo">			
			<span><img src="${ctxStatic}/images/logo.png" style="margin-bottom: 35px;margin-right:20px;width:300px;"/></span>
		</div>
		<div class="header">
			<div id="messageBox" class="alert alert-error ${empty message ? 'hide' : ''}"><button data-dismiss="alert" class="close">×</button>
				<label id="loginError" class="error">${message}</label>
			</div>
		</div>
	</div>
	<div class="login container " id="login" style="background-image:url('${ctxStatic}/images/bg.png');">
		<span style="color: #ffffff;font-size:35px; margin-right:10%;" >区委大数据系统</span><br>
		<form id="loginForm" class="form-signin" action="${ctx}/login" method="post">
			<label class="input-label" for="username">登录名</label>
			<input type="text" id="username" name="username" class="input-block-level required" value="${username}">
			<label class="input-label" for="password">密码</label>
			<input type="password" id="password" name="password" class="input-block-level required">
			<c:if test="${isValidateCodeLogin}">
				<div class="validateCode" style="float:left">
					<label class="input-label mid" for="validateCode">验证码</label>
					<sys:validateCode name="validateCode" inputCssStyle="margin-bottom:0;"/>
				</div>
			</c:if>
			<%--
			<label for="rememberMe" title="下次不需要再登录" style="color:#000;margin-top: 10px;"><input type="checkbox" id="rememberMe" name="rememberMe" ${rememberMe ? 'checked' : ''}/> 记住我（公共场所慎用）</label>
			 --%>
			<input class="btn btn-primary" style="line-height: 0px;margin:20px 0px 0px 0px;color:#fff;width: 100px; float:right" type="submit" value="登 录"/>&nbsp;&nbsp;
<!-- 			<div id="themeSwitch" class="dropdown"> -->
<%-- 				<a class="dropdown-toggle" data-toggle="dropdown" href="#" style="color:#fff">${fns:getDictLabel(cookie.theme.value,'theme','默认主题')}<b class="caret"></b></a> --%>
<!-- 				<ul class="dropdown-menu"> -->
<%-- 				  <c:forEach items="${fns:getDictList('theme')}" var="dict"><li><a href="#" onclick="location='${pageContext.request.contextPath}/theme/${dict.value}?url='+location.href">${dict.label}</a></li></c:forEach> --%>
<!-- 				</ul> -->
<!-- 				[if lte IE 6]><script type="text/javascript">$('#themeSwitch').hide();</script><![endif] -->
<!-- 			</div> -->
		</form>
	</div>
	<div class="footer">
		<span style="color:#354288;font-size: 14px;">辽宁联通大数据公司  版权所有</span>
		<%-- Copyright &copy; 2012-${fns:getConfig('copyrightYear')} <a href="${pageContext.request.contextPath}${fns:getFrontPath()}">${fns:getConfig('productName')}</a> - Powered By <a href="http://jeesite.com" target="_blank">JeeSite</a> ${fns:getConfig('version')}  --%>
	</div>
	
</body>
</html>
